<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
       <label for="c-grade_id" class="control-label col-xs-12 col-sm-2">{:__('Grade_id')}:</label>
       <div class="col-xs-12 col-sm-8">
           {$gradeList}
       </div>
    </div>
    <div class="form-group">
       <label for="c-subject_id" class="control-label col-xs-12 col-sm-2">{:__('Subject_id')}:</label>
       <div class="col-xs-12 col-sm-8">
           {$subjectList}
       </div>
    </div>
    <div class="form-group">
       <label for="c-section_id" class="control-label col-xs-12 col-sm-2">{:__('Section_id')}:</label>
       <div class="col-xs-12 col-sm-8">
           {$sectionList}
       </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>	
        <div class="col-xs-12 col-sm-8">
          <div class="input-group input-groupp-md">
			<input id="c-times" data-rule="required" class="form-control" name="row[times]" type="number" value="{$row.times|htmlentities}">
            <a href="javascript:;" class=" input-group-addon">{:__('Minute')}</a>
          </div>        
        </div>
    </div>
	<div class="form-group">
		        <label class="control-label col-xs-12 col-sm-2">{:__('Setting')}:</label>
		        <div class="col-xs-12 col-sm-8">
		            
		            <dl class="fieldlist" data-template="setting" data-name="row[setting]">
		                <dd>
		                    <ins>{:__('Setting Type')}</ins>
							<ins>{:__('Setting Name')}</ins>
		                    <ins>{:__('Setting Quantity')}</ins>
		                    <ins>{:__('Setting Score')}</ins>
							<ins>{:__('Setting Questions')}</ins>
		                </dd>
		                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
						<span><button type="button" id="fachoose-images" class="btn btn-primary btn-success btn-choose" data-input-id="<%=name%><%=index%>questions"  data-multiple="true" ref="type111"><i class="fa fa-list"></i> 查题</button></span>
						</dd>
		                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
		                <textarea name="row[setting]" class="form-control hide" cols="30" rows="5">{$row.setting|htmlentities}</textarea>
		            </dl>
		            <script id="setting" type="text/html">
		                <dd class="form-inline setting-row">
		                    <ins>
		                        <select name="<%=name%>[<%=index%>][type]" id="" class="form-control selectpicker ">
		                            <option value="1" <%if(row.type==1){%>selected<%}%>>{:__('Single')}</option>
		                            <option value="2" <%if(row.type==2){%>selected<%}%>>{:__('Multiple')}</option>
		                            <option value="3" <%if(row.type==3){%>selected<%}%>>{:__('Judge')}</option>
									<option value="4" <%if(row.type==4){%>selected<%}%>>{:__('Fill')}</option>
									<option value="9" <%if(row.type==9){%>selected<%}%>>{:__('Other')}</option>
		                        </select>
		                    </ins>
							<ins><input type="text"  name="<%=name%>[<%=index%>][title]" class="form-control " value="<%=row.title%>" placeholder="名称"/></ins>
							
		                    <ins><input type="number" step="1" min='1' name="<%=name%>[<%=index%>][quantity]" class="form-control quantity scoreset" value="<%=row.quantity%>" placeholder="数量"/></ins>
		                    <ins><input type="number" step="1" min='1' name="<%=name%>[<%=index%>][score]" class="form-control score scoreset" value="<%=row.score%>" placeholder="分值"/></ins>
		                    <ins><input type="text"  name="<%=name%>[<%=index%>][questions]" class="form-control " value="<%=row.questions%>" placeholder="多题ID逗号分开"/></ins>
		                   
							<!--下面的两个按钮务必保留-->
		                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
		                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
		                </dd>
		            </script>
		        </div>
	</div>
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Totalscore')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-totalscore" data-rule="required" class="form-control" name="row[totalscore]" type="number" value="{$row.totalscore|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Passscore')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-passscore" data-rule="required" class="form-control" name="row[passscore]" type="number" value="{$row.passscore|htmlentities}">
        </div>
    </div>
	<div class="form-group">
	    <label class="control-label col-xs-12 col-sm-2">{:__('Compose')}:</label>
	    <div class="col-xs-12 col-sm-8">
		    <input  id="c-ismade" name="row[ismade]" type="hidden" value="1">
		    <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-ismade" data-yes="1" data-no="0" >
			<i class="fa fa-toggle-on text-success fa-2x"></i>   
		   </a>
	    </div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
